<template>
	<view class="uni-container">
		<view class="goods-carts">
			<uni-goods-nav :options="options" :fill="true" :button-group="buttonGroup" @click="onClick"
				@buttonClick="buttonClick" />
		</view>
	</view>
</template>

<script>
	import UniGoodsNav  from '@/uni_modules/uni-goods-nav/components/uni-goods-nav/uni-goods-nav.vue';
	export default {
		components: { UniGoodsNav },
		name: "goodNav",
		data() {
			return {
				options: [{
					id:1,
					icon: 'shop',
					text: '首页',
					// info: 2,
					infoBackgroundColor: '#007aff',
					infoColor: "#f5f5f5"
				}, {
					id:2,
					icon: 'chat',
					text: '咨询'
					// info: 2
				}],
				buttonGroup: [
					// {
					// 	text: '加入购物车',
					// 	backgroundColor: 'linear-gradient(90deg, #FFCD1E, #FF8A18)',
					// 	color: '#fff'
					// },
					{
						text: '马上下单',
						backgroundColor: 'linear-gradient(90deg, #52cbff, #007aff)',
						color: '#fff'
					} 
				]
			}
		},
		onLoad() {},
		methods: {
			onClick(e) {
				this.$emit('goodNavclick',e.content.id);
			},
			buttonClick(e) {
				this.$emit('buttonClick');
			}
		}
	}
</script>

<style lang="scss">
	.example-body {
		padding: 0;
		/* #ifndef APP-NVUE */
		display: block;
		/* #endif */
	}

	.goods-carts {
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: column;
		position: fixed;
		left: 0;
		right: 0;
		/* #ifdef H5 */
		left: var(--window-left);
		right: var(--window-right);
		/* #endif */
		bottom: 0;
	}
</style>